<% if  @shopping_addresses.empty? %>
  <h2>New Address</h2>
<% else %>
  <h3>Pick a Shipping Address</h3>
<% end %>

<div id='shopping_addresses_selections' class='large-12 last'>
  <% @shopping_addresses.each do |shopping_address| %>
    <div class='large-4 columns last box'>
      <%= render :partial => '/shared/compact_address', :locals => {:shopping_address => shopping_address} %>
      <%= button_to 'Use', select_address_shopping_address_path(shopping_address), :class => 'button spade inline-block', :method => :put %>
      <%= link_to 'Edit', edit_shopping_address_path(shopping_address) %>
      <%= link_to 'Delete', shopping_address_path(shopping_address), :data => {:confirm => 'Are you sure?'}, :method => :delete %>
    </div>
    <hr style='color:#aac'/>
  <% end %>
  <% if session_order.ready_to_checkout? %>
    <%= link_to 'Order Summary', shopping_orders_path, :class => 'button success' %>
  <% end %>
</div>
<br />
<%= form_for @shopping_address, url: shopping_addresses_path, html: {class: 'custom'} do |address_form| %>
  <%= render :partial =>  'form', :locals => {:f => address_form}  %>
<% end %>
